<template>
	<view class="" style="overflow: hidden;">
	<el-menu
	      default-active="2"
	      class="el-menu-vertical-demo"
	      @open="handleOpen"
	      @close="handleClose">
	      <el-menu-item index="0" @click="go('/')">
	        <i class="el-icon-menu"></i>
	        <span slot="title">首页</span>
	      </el-menu-item>
<!--	      <el-menu-item index="1" @click="go('/pages/cockpit/index')">-->
<!--	        <i class="el-icon-setting"></i>-->
<!--	        <span slot="title" >驾驶舱</span>-->
<!--	      </el-menu-item>-->
	    </el-menu>
	</view>
</template>
<script>
  export default {
    methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      },
	  go(tab){
		  uni.switchTab({
		  	url:tab
		  });
	  }
    }
  }
</script>
